import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '@views/Home'
Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    redirect: '/home'
  },
  {
    path: '/home',
    component: Home
  },
  {
    path: '/news',
    component: () => import('@views/News')
  },
  {
    path: '/about',
    component: () => import('@views/About')
  }
]

const router = new VueRouter({
  mode: 'hash',
  base: process.env.BASE_URL,
  routes
})

export default router
